package com.iking.housekeeping.common;

/**
 * 统一异常返回
 * @author 张重阳
 *
 */
public class CommonException extends RuntimeException {
	
	private static final long serialVersionUID = 1L;
	
	private ReturnCode returnCode;

	public CommonException(CodeEnum codeEnum, String userId) {
		super(codeEnum.msg());
		this.returnCode = new ReturnCode(codeEnum, userId);
	}

	public ReturnCode getReturnCode() {
		return returnCode;
	}

	public void setReturnCode(ReturnCode returnCode) {
		this.returnCode = returnCode;
	}
}
